home *** CD-ROM | disk | FTP | other *** search
- Path: news.kei.com!ub!newserve!usenet
- From: David J. Graff <phlatline@mhv.net>
- Newsgroups: comp.lang.rexx
- Subject: RxSockets
- Date: Mon, 29 Jan 1996 04:44:07 GMT
- Organization: Binghamton University, Binghamton, NY
- Distribution: inet
- Message-ID: <4ehjah$60@bingnet1.cc.binghamton.edu>
- NNTP-Posting-Host: 128.226.40.220
- X-Newsreader: Post Road News Reader 1.01c
-
- I have a question about RexxSockets. I am able to create a TCP client but
- I seem to have a problem receiving anything more than once from the stream
- socket.
-
- What I would like to do is send a message out to the remote end and read a
- response.
-
- Here is what I am currently doing to send a message out to the remote end:
-
- rc = RxFuncAdd('SockLoadFuncs','RxSock','SockLoadFuncs')
- rc = SockLoadFuncs()
- sockfd = SockSocket('AF_INET','SOCK_STREAM',0)
-
- rc = SockGetHostByName('downwind.sprl.umich.edu',remote.!)
-
- addr.!addr = remote.!addr
- addr.!family = 'AF_INET'
- addr.!port = 3000
-
- rc = SockConnect(sockfd,addr.!)
-
- rc = SockRecv(sockfd,inbuf,4096,addr.!)
-
- /* Which prints out the connection banner */
- say inbuf
-
- /* Message to Weather underground */
- outmsg = "bgm" || D2C(13)
-
- /* Sending message */
- rc = SockSend(sockfd,outmsg,LENGTH(outmsg),addr.!)
-
- /* rc is 4 */
- rc = SockRecv(sockfd,inmsg,4096,addr.!)
-
- /* At which point the program would hang */
-
- any help would be appreciated
-
-
-
- --Dave
-
- --
- David J. Graff KB2RUM
- phlatline@mhv.net
-